package org.learn.test;
import java.util.Scanner;
public class Array02 {
    public static void main(String[] args) {
        //array必须是同一类型，不可以把double赋值给int等等；还可以识别引用类型；
        //对于各个类型的数据，array 有相应的默认值；
        //int.short.byte.long.float.double.char.String.
        double[] scores = new double[5];
        for( int i = 0; i < scores.length; i++){
            System.out.println("请输入第" + (i+1) + "个元素");
            Scanner myScanner = new Scanner(System.in);
            scores[i] = myScanner.nextDouble();
        }
        System.out.println("==数组的元素/ 值情况如下；==");
        for( int i = 0; i < scores.length;i++){
            System.out.println("第" + (i+1) + "个元素的值=" + scores[i]);
        }
    }
}
